Page({
    data:{
        title:"尘",
        time:"2019-12-27",
        singer:"薛之谦",
        url:"http://p1.music.126.net/DHUrNjC-1d6Snpcfg20Umw==/109951164583315133.jpg?param=177y177",
        list:[
            {
                id:1374051000,
                videoSrc:"http://link.hhtjim.com/163/1374051000.mp3",
                songname:"木偶人",
                name:"薛之谦",
            },
            {
                id:1374061028,
                videoSrc:"http://link.hhtjim.com/163/1374061028.mp3",
                songname:"慢半拍",
                name:"薛之谦",
            },
            {
                id:1374061036,
                videoSrc:"http://link.hhtjim.com/163/1374061036.mp3",
                songname:"这么久没见",
                name:"薛之谦",
            },
            {
                id:1374061038,
                videoSrc:"http://link.hhtjim.com/163/1374061038.mp3",
                songname:"笑场",
                name:"薛之谦",
            },
            {
                id:1374056687,
                videoSrc:"http://link.hhtjim.com/163/1374056687.mp3",
                songname:"病态",
                name:"薛之谦",
            },
            {
                id:1374056688,
                videoSrc:"http://link.hhtjim.com/163/1374056688.mp3",
                songname:"尘",
                name:"薛之谦",
            },
            {
                id:1374056689,
                videoSrc:"http://link.hhtjim.com/163/1374056689.mp3",
                songname:"陪你去流浪",
                name:"薛之谦",
            },
            {
                id:1374061040,
                videoSrc:"http://link.hhtjim.com/163/1374061040.mp3",
                songname:"配合",
                name:"薛之谦",
            },
            {
                id:1374056690,
                videoSrc:"http://link.hhtjim.com/163/1374056690.mp3",
                songname:"环",
                name:"薛之谦",
            },
            {
                id:1374061043,
                videoSrc:"http://link.hhtjim.com/163/1374061043.mp3",
                songname:"聊表心意",
                name:"薛之谦",
            },
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})